﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using HZ.MBSM.DBUtility;


public partial class HomePage_ProsecuteAnswerInfo : System.Web.UI.Page
{
    public string strTitle, strContent, strAddDate;
    private string Id;
    protected void Page_Load(object sender, EventArgs e)
    {
        Id = SysFun.IsSQL(SysFun.ToTrim(Request.QueryString["Id"]));
        if (!IsPostBack)
        {
            if (Id != "" && Id != null)
            {
                string sql = "select Id,Title,AddDate,Content from ProsecuteAnswer ";
                sql += "where Id=" + Id;
                Db db = new Db();
                try
                {
                    System.Data.IDataReader dr;
                    dr = db.DataReader(sql);
                    if (dr.Read())
                    {
                        strTitle = dr["Title"].ToString();
                        strContent = dr["Content"].ToString().Replace("\r\n", "<br>");
                        strAddDate = Convert.ToDateTime(dr["AddDate"].ToString()).ToShortDateString();

                    }
                    dr.Close();
                    dr.Dispose();

                    db.Close();
                }
                catch
                {
                    db.Close();
                }

            }


        }


    }
}
